<div class="cil__detail-rest-info--label">{{'BIZ.STORE.OTHER.TRADE' | i18n}}</div>
<app-info-row
  *ngFor="let column of columns[fields.TradeFunction]; let rowIndex = index"
  [columns]="column"
  [ifEdit]="isEdits[fields.TradeFunction][rowIndex]"
  (active)="activeItem($event, rowIndex)"
  [rowIndex]="rowIndex"
></app-info-row>

<!-- 交易类型先去掉，二期上
<div class="cil__detail-rest-info--label">交易类型</div>
<app-info-row
  *ngFor="let column of columns[fields.TradeType]; let rowId = index"
  [columns]="column"
  [ifEdit]="isEdits[fields.TradeType][rowId]"
  (active)="activeItem($event, rowId)"
  [id]="rowId"
></app-info-row>
-->
<div class="cil__detail-rest-info--label">商户录入功能</div>
<app-info-row
  *ngFor="let column of columns[fields.TradeWallet]; let rowIndex = index"
  [columns]="column"
  [ifEdit]="isEdits[fields.TradeWallet][rowIndex]"
  (active)="activeItem($event, rowIndex)"
  [id]="rowIndex"
></app-info-row>

<!-- tradeFunctions -->
<ng-template #tpRefund let-column="column">
  <nz-radio-group [(ngModel)]="column.value">
    <label nz-radio [nzValue]="true">{{'BIZ.STORE.OTHER.TRADE.REFUND_MODE.ASYNC' | i18n}}</label>
    <label nz-radio [nzValue]="false">{{'BIZ.STORE.OTHER.TRADE.REFUND_MODE.SYNC' | i18n}}</label>
  </nz-radio-group>
</ng-template>

<ng-template #tpSupportTips let-column="column">
  <nz-switch
    [(ngModel)]="column.value"
    [nzCheckedChildren]="'GENERAL.INFO.SWITCH.ON' | i18n"
    [nzUnCheckedChildren]="'GENERAL.INFO.SWITCH.OFF' | i18n"
  ></nz-switch>
</ng-template>

<ng-template #tpFixAmount let-column="column">
  <nz-switch
    [(ngModel)]="column.value"
    [nzCheckedChildren]="'GENERAL.INFO.SWITCH.ON' | i18n"
    [nzUnCheckedChildren]="'GENERAL.INFO.SWITCH.OFF' | i18n"
  ></nz-switch>
</ng-template>

<!-- tradeTypes -->
<ng-template #tpTransactionTypes let-column="column">
  <nz-checkbox-group [(ngModel)]="transactionTypes"></nz-checkbox-group>
</ng-template>

<!-- businessFunctions -->
<ng-template #tpWxp let-column="column">
  <nz-switch
    [(ngModel)]="column.value"
    [nzCheckedChildren]="'GENERAL.INFO.SWITCH.ON' | i18n"
    [nzUnCheckedChildren]="'GENERAL.INFO.SWITCH.OFF' | i18n"
  ></nz-switch>
</ng-template>

<ng-template #tpAlp let-column="column">
  <nz-switch
    [nzCheckedChildren]="'GENERAL.INFO.SWITCH.ON' | i18n"
    [nzUnCheckedChildren]="'GENERAL.INFO.SWITCH.OFF' | i18n"
    [(ngModel)]="column.value">
  </nz-switch>
</ng-template>


<!-- Operator(Button Group) -->
<ng-template #operatorFunction let-rowIndex="rowIndex">
  <app-rest-edit
    [editing]="isEdits[fields.TradeFunction][rowIndex]"
    (edit)="edit(fields.TradeFunction, rowIndex)"
    (cancel)="cancel()"
    (submit)="submit()"
  ></app-rest-edit>
</ng-template>

<ng-template #operatorType let-rowIndex="rowIndex">
  <app-rest-edit
    [editing]="isEdits[fields.TradeType][rowIndex]"
    (edit)="edit(fields.TradeType, rowIndex)"
    (cancel)="cancel()"
    (submit)="submit()"
  ></app-rest-edit>
</ng-template>

<ng-template #operatorWallet let-rowIndex="rowIndex">
  <app-rest-edit
    [editing]="isEdits[fields.TradeWallet][rowIndex]"
    (edit)="edit(fields.TradeWallet, rowIndex)"
    (cancel)="cancel()"
    (submit)="submit()"
  ></app-rest-edit>
</ng-template>
